<template>
  <div class='header'>
    <div class="header-left">
      <div class="iconfont backico">&#xe624;</div>
    </div>
    <div class="header-input">
      <span class="iconfont">&#xe632;</span>
      输入城市/景点/游玩主题
     </div>
     <router-link to='/city'>
    <div class="header-right">
      <!-- {{typeof city === 'string' && city.length > 0 ?city:'城市'}} -->
      <!-- {{this.dbCity}} -->
      {{this.city}}
      <span class="iconfont arrow">&#xe64a;</span>
      </div>
     </router-link>
  </div>
</template>

<script>
import {mapGetters, mapState} from 'vuex'
export default {
  name: 'myhead',
  props: {
  },
  data () {
    return {
    }
  },
  computed: {
    ...mapState(['city']),
    ...mapGetters(['dbCity'])
  }
}
</script>

<style lang='stylus' scoped>
@import '~styles/varibles.styl'
@import '~styles/mixins.styl'
  .header
    display :flex
    line-height : .86rem
    background-color :$bgColor
    color:#fff
    ellipsis()
    .header-left
      width :.64rem
      float :left
      .backico
        text-align :center
        font-size :.4rem
    .header-input
      padding-left :0.2rem
      background-color:white
      border-radius :.1rem
      height :.64rem
      line-height :.64rem
      margin-left :.2rem
      margin-top .12rem
      flex :1
      color :#aaa
    .header-right
      min-width: 1.04rem
      padding : 0 .1rem
      float: right
      text-align :center
      padding-left :0.1rem
      color:white
      .arrow
        font-size :0.24rem
        margin-left :-0.05rem
</style>
